package com.cluster;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * Created with IntelliJ IDEA by ChouFy on 2020-04-11.
 *
 * @author zhoufy
 */
@Controller
@RequestMapping("/demo")
public class IndexController {


    @Autowired
    UserDao userDao;

    @RequestMapping("/result")
    @ResponseBody
    public Object index(HttpServletRequest request) {
        return userDao.findByJpql();
    }

}
